function main2222() {
    var library_name = "libcocos2djs.so" // ex: libsqlite.so
    var loaded = false
    var enums = Module.enumerateSymbols("linker")
    var tt = null
    for (var i =0 ; i< enums.length ; i++ ){
        if(enums[i].name == "__dl__ZL10dlopen_extPKciPK17android_dlextinfoPKv"){
            tt = enums[i].address
        }
    }
    console.log("tt", tt)
    Interceptor.attach(tt,{
        onEnter: function(args){
            var library_path = Memory.readCString(args[0])
           // console.log("found library : " + library_path)
            if( library_path.includes(library_name)){
                console.log("found library : " + library_path)
                loaded = true
            }
        },
        onLeave: function(args){
            if(loaded){
           var jni_OnLoad = Module.findExportByName("libcocos2djs.so","JNI_OnLoad")
           var base_addr = Module.findBaseAddress("libcocos2djs.so")
           console.log("base_addr : " + base_addr)
           console.log("jni_OnLoad_symbol : " + jni_OnLoad)
            var scheduler6update = base_addr.add(0X005C4CCC)
            console.log("scheduler6update : " + scheduler6update)
          
              Interceptor.attach(jni_OnLoad ,{
                onEnter: function(args){
                    console.log('jni_OnLoad')
                    },
                    onLeave: function(ret){
                    console.log('jni_OnLoad ret')
                    Interceptor.attach(scheduler6update ,{
                        onEnter: function(args){
                            // console.log("---->",ptr(args[1]).readFloat())
                            console.log("------------------")
                            console.log(ptr(args[0]))
                            console.log(ptr(args[1]))
                            },
                            onLeave: function(ret){
                        
                        }
                      })

                }
              })
                loaded = false
            }
        }
    })
}

setImmediate(main2222);


// frida -U com.hnzh.dldlwhjx.aligames -l c2ddldl

// frida -U --no-pause -f com.ftaro.kingwar.tyhjz -l c2dty

// frida -U com.ftaro.kingwar.tyhjz -l c2dty
